home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
tclMotif-1.4
/
tests
/
actions.test
next >
Wrap
Text File
|
1995-06-29
|
941b
|
47 lines
if {[string compare test [info procs test]] == 1} then \
{source defs}
# set VERBOSE 1
# set INTERACTIVE 1
#############
# starts here
#############
xtAppInitialize
. setValues -allowShellResize true
xmPushButton .actionbtn managed
############################
# test action installation #
############################
test action-1.1 {action with 1 arg} {
.actionbtn callActionProc {action("set x 1; set x")}
} {1}
test action-1.2 {action with more args} {
.actionbtn callActionProc {action(set, x, 2, ;, set, x)}
} {2}
test action-1.3 {action with more args, mixing quotes and non-quotes} {
.actionbtn callActionProc {action("set x", "0", ;, set, "x 3;", set, "x")}
} {3}
test action-1.4 {action with varying separators} {
.actionbtn callActionProc {action(set , x ,4, ; , set ,
x
)}
} {4}
#############
# Finish up #
#############
if { ! $INTERACTIVE} {
.actionbtn destroyWidget
} else {
. mainLoop
}